<template>
    <div class="maxdiv">
        <div class="divs">
            <iframe style="width:100%;height:100%" class="iframes">
                
            </iframe>
            <div class="names" v-for="(item, index) in list" :key="index">姓名:{{item.name}},----年龄:{{item.age}}</div>
        </div>
        <el-button @click="addList">新增</el-button>
    </div>
</template>

<script>
export default {
    data(){
        return{
            list:[
                {name:'Anluea', age:18},
                {name:'Anluea', age:18},
                {name:'Anluea', age:18},
                {name:'Anluea', age:18}
            ]
        }
    },
    methods:{
        addList(){
            this.list.push({
                name:'新增',
                age:17
            })
        }
    }
}
</script>

<style scoped>
    .divs{
        width: 300px;
        min-height: 200px;
        border: 2px solid #000;
        margin: auto;
        position: relative;
    }
    .maxdiv{
        width:100%;height:100%;
        display: flex;justify-content: center;
        flex-direction: column;
    }
    .names{
        height: 40px; width: 100%;
        border: 1px solid rgb(76, 205, 1);
    }
    .iframes{
        position: absolute;
    }
</style>